using DAL;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace MainOP
{
    public class oductDataToDJ2Func
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name=med></param>
        /// <returns></returns>
        public static bool Insert(oductDataToDJModel2 oductdatatodjmodel)
        {
            System.Collections.ArrayList paramlist = new System.Collections.ArrayList();
            bool re = false;
            StringBuilder strSQL = new StringBuilder();
            StringBuilder strValue = new StringBuilder();
            strSQL.Append("insert into productDataToDJ(");
            strValue.Append("values("); strSQL.Append("[testDoneDate]");
            strValue.Append("'" + oductdatatodjmodel.testDoneDate.ToString() + "'");
            strSQL.Append(",[typeName]");
            strValue.Append(",'" + oductdatatodjmodel.typeName.ToString() + "'");
            strSQL.Append(",[serialNumber]");
            strValue.Append(",'" + oductdatatodjmodel.serialNumber.ToString() + "'");
            strSQL.Append(",[操作员]");
            strValue.Append(",'" + oductdatatodjmodel.操作员.ToString() + "'");
            strSQL.Append(",[总结果]");
            strValue.Append(",'" + oductdatatodjmodel.总结果.ToString() + "'");
            strSQL.Append(",[新风内循环电压]");
            strValue.Append(",'" + oductdatatodjmodel.新风内循环电压.ToString() + "'");
            strSQL.Append(",[新风内循环角度]");
            strValue.Append(",'" + oductdatatodjmodel.新风内循环角度.ToString() + "'");
            strSQL.Append(",[新风内循环结果]");
            strValue.Append(",'" + oductdatatodjmodel.新风内循环结果.ToString() + "'");
            strSQL.Append(",[新风外循环电压]");
            strValue.Append(",'" + oductdatatodjmodel.新风外循环电压.ToString() + "'");
            strSQL.Append(",[新风外循环角度]");
            strValue.Append(",'" + oductdatatodjmodel.新风外循环角度.ToString() + "'");
            strSQL.Append(",[新风外循环结果]");
            strValue.Append(",'" + oductdatatodjmodel.新风外循环结果.ToString() + "'");
            strSQL.Append(",[新风出厂电压]");
            strValue.Append(",'" + oductdatatodjmodel.新风出厂电压.ToString() + "'");
            strSQL.Append(",[新风出厂角度]");
            strValue.Append(",'" + oductdatatodjmodel.新风出厂角度.ToString() + "'");
            strSQL.Append(",[新风出厂结果]");
            strValue.Append(",'" + oductdatatodjmodel.新风出厂结果.ToString() + "'");
            strSQL.Append(",[循环内循环电压]");
            strValue.Append(",'" + oductdatatodjmodel.循环内循环电压.ToString() + "'");
            strSQL.Append(",[循环内循环角度]");
            strValue.Append(",'" + oductdatatodjmodel.循环内循环角度.ToString() + "'");
            strSQL.Append(",[循环内循环结果]");
            strValue.Append(",'" + oductdatatodjmodel.循环内循环结果.ToString() + "'");
            strSQL.Append(",[循环外循环电压]");
            strValue.Append(",'" + oductdatatodjmodel.循环外循环电压.ToString() + "'");
            strSQL.Append(",[循环外循环角度]");
            strValue.Append(",'" + oductdatatodjmodel.循环外循环角度.ToString() + "'");
            strSQL.Append(",[循环外循环结果]");
            strValue.Append(",'" + oductdatatodjmodel.循环外循环结果.ToString() + "'");
            strSQL.Append(",[循环出厂电压]");
            strValue.Append(",'" + oductdatatodjmodel.循环出厂电压.ToString() + "'");
            strSQL.Append(",[循环出厂角度]");
            strValue.Append(",'" + oductdatatodjmodel.循环出厂角度.ToString() + "'");
            strSQL.Append(",[循环出厂结果]");
            strValue.Append(",'" + oductdatatodjmodel.循环出厂结果.ToString() + "'");
            strSQL.Append(",[鼓风机一档占空比]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机一档占空比.ToString() + "'");
            strSQL.Append(",[鼓风机一档电压]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机一档电压.ToString() + "'");
            strSQL.Append(",[鼓风机一档电流]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机一档电流.ToString() + "'");
            strSQL.Append(",[鼓风机一档振动X]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机一档振动X.ToString() + "'");
            strSQL.Append(",[鼓风机一档振动Y]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机一档振动Y.ToString() + "'");
            strSQL.Append(",[鼓风机一档NVH结果]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机一档NVH结果.ToString() + "'");
            strSQL.Append(",[鼓风机一档结果]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机一档结果.ToString() + "'");
            strSQL.Append(",[鼓风机二档占空比]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机二档占空比.ToString() + "'");
            strSQL.Append(",[鼓风机二档电压]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机二档电压.ToString() + "'");
            strSQL.Append(",[鼓风机二档电流]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机二档电流.ToString() + "'");
            strSQL.Append(",[鼓风机二档振动X]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机二档振动X.ToString() + "'");
            strSQL.Append(",[鼓风机二档振动Y]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机二档振动Y.ToString() + "'");
            strSQL.Append(",[鼓风机二档NVH结果]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机二档NVH结果.ToString() + "'");
            strSQL.Append(",[鼓风机二档结果]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机二档结果.ToString() + "'");
            strSQL.Append(",[鼓风机三档占空比]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机三档占空比.ToString() + "'");
            strSQL.Append(",[鼓风机三档电压]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机三档电压.ToString() + "'");
            strSQL.Append(",[鼓风机三档电流]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机三档电流.ToString() + "'");
            strSQL.Append(",[鼓风机三档振动X]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机三档振动X.ToString() + "'");
            strSQL.Append(",[鼓风机三档振动Y]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机三档振动Y.ToString() + "'");
            strSQL.Append(",[鼓风机三档NVH结果]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机三档NVH结果.ToString() + "'");
            strSQL.Append(",[鼓风机三档结果]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机三档结果.ToString() + "'");
            strSQL.Append(",[鼓风机四档占空比]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机四档占空比.ToString() + "'");
            strSQL.Append(",[鼓风机四档电压]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机四档电压.ToString() + "'");
            strSQL.Append(",[鼓风机四档电流]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机四档电流.ToString() + "'");
            strSQL.Append(",[鼓风机四档振动X]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机四档振动X.ToString() + "'");
            strSQL.Append(",[鼓风机四档振动Y]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机四档振动Y.ToString() + "'");
            strSQL.Append(",[鼓风机四档NVH结果]");
            strValue.Append(",'" + oductdatatodjmodel.NVH.ToString() + "'");
            strSQL.Append(",[鼓风机四档结果]");
            strValue.Append(",'" + oductdatatodjmodel.鼓风机四档结果.ToString() + "'");
            strSQL.Append(",[蒸发器温度]");
            strValue.Append(",'" + oductdatatodjmodel.蒸发器温度.ToString() + "'");
            strSQL.Append(",[温度压力传感器]");
            strValue.Append(",'" + oductdatatodjmodel.温度压力传感器.ToString() + "'");
            strSQL.Append(",[CCU软件版本号]");
            strValue.Append(",'" + oductdatatodjmodel.CCU软件版本号.ToString() + "'");
            strSQL.Append(",[CCU硬件版本号]");
            strValue.Append(",'" + oductdatatodjmodel.CCU硬件版本号.ToString() + "'");
            strSQL.Append(",[EXV]");
            strValue.Append(",'" + oductdatatodjmodel.EXV.ToString() + "'");
            strSQL.Append(",[SOTXV]");
            strValue.Append(",'" + oductdatatodjmodel.SOTXV.ToString() + "'");
            strSQL.Append(",[CAN1结果]");
            strValue.Append(",'" + oductdatatodjmodel.CAN1结果.ToString() + "'");
            strSQL.Append(",[CAN2结果]");
            strValue.Append(",'" + oductdatatodjmodel.CAN2结果.ToString() + "'");
            strSQL.Append(",[LIN结果]");
            strValue.Append(",'" + oductdatatodjmodel.LIN结果.ToString() + "'");
            strSQL.Append(",[CCU标定结果])");
            strValue.Append(",'" + oductdatatodjmodel.CCU标定结果.ToString() + "')");

            string str = strSQL.ToString() + "\r\n" + strValue.ToString();
            try
            {
                IDataParameter[] param = (IDataParameter[])paramlist.ToArray(typeof(IDataParameter));
                re = SqlHelperDJ2.ExceNonQuery(str, CommandType.Text, param);
            }
            catch
            {
                re = false;
            }
            return re;
        }

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name=med></param>
        /// <returns></returns>
        public static bool update(oductDataToDJModel2 oductdatatodjmodel)
        {
            System.Collections.ArrayList paramlist = new System.Collections.ArrayList();
            bool re = false;
            StringBuilder strSQL = new StringBuilder();
            strSQL.Append("update productDataToDJ set ");
            strSQL.Append("testDoneDate='" + oductdatatodjmodel.testDoneDate.ToString() + "'");
            strSQL.Append(",typeName='" + oductdatatodjmodel.typeName.ToString() + "'");
            strSQL.Append(",serialNumber='" + oductdatatodjmodel.serialNumber.ToString() + "'");
            strSQL.Append(",操作员='" + oductdatatodjmodel.操作员.ToString() + "'");
            strSQL.Append(",总结果='" + oductdatatodjmodel.总结果.ToString() + "'");
            strSQL.Append(",新风内循环电压='" + oductdatatodjmodel.新风内循环电压.ToString() + "'");
            strSQL.Append(",新风内循环角度='" + oductdatatodjmodel.新风内循环角度.ToString() + "'");
            strSQL.Append(",新风内循环结果='" + oductdatatodjmodel.新风内循环结果.ToString() + "'");
            strSQL.Append(",新风外循环电压='" + oductdatatodjmodel.新风外循环电压.ToString() + "'");
            strSQL.Append(",新风外循环角度='" + oductdatatodjmodel.新风外循环角度.ToString() + "'");
            strSQL.Append(",新风外循环结果='" + oductdatatodjmodel.新风外循环结果.ToString() + "'");
            strSQL.Append(",新风出厂电压='" + oductdatatodjmodel.新风出厂电压.ToString() + "'");
            strSQL.Append(",新风出厂角度='" + oductdatatodjmodel.新风出厂角度.ToString() + "'");
            strSQL.Append(",新风出厂结果='" + oductdatatodjmodel.新风出厂结果.ToString() + "'");
            strSQL.Append(",循环内循环电压='" + oductdatatodjmodel.循环内循环电压.ToString() + "'");
            strSQL.Append(",循环内循环角度='" + oductdatatodjmodel.循环内循环角度.ToString() + "'");
            strSQL.Append(",循环内循环结果='" + oductdatatodjmodel.循环内循环结果.ToString() + "'");
            strSQL.Append(",循环外循环电压='" + oductdatatodjmodel.循环外循环电压.ToString() + "'");
            strSQL.Append(",循环外循环角度='" + oductdatatodjmodel.循环外循环角度.ToString() + "'");
            strSQL.Append(",循环外循环结果='" + oductdatatodjmodel.循环外循环结果.ToString() + "'");
            strSQL.Append(",循环出厂电压='" + oductdatatodjmodel.循环出厂电压.ToString() + "'");
            strSQL.Append(",循环出厂角度='" + oductdatatodjmodel.循环出厂角度.ToString() + "'");
            strSQL.Append(",循环出厂结果='" + oductdatatodjmodel.循环出厂结果.ToString() + "'");
            strSQL.Append(",鼓风机一档占空比='" + oductdatatodjmodel.鼓风机一档占空比.ToString() + "'");
            strSQL.Append(",鼓风机一档电压='" + oductdatatodjmodel.鼓风机一档电压.ToString() + "'");
            strSQL.Append(",鼓风机一档电流='" + oductdatatodjmodel.鼓风机一档电流.ToString() + "'");
            strSQL.Append(",鼓风机一档振动X='" + oductdatatodjmodel.鼓风机一档振动X.ToString() + "'");
            strSQL.Append(",鼓风机一档振动Y='" + oductdatatodjmodel.鼓风机一档振动Y.ToString() + "'");
            strSQL.Append(",鼓风机一档NVH结果='" + oductdatatodjmodel.鼓风机一档NVH结果.ToString() + "'");
            strSQL.Append(",鼓风机一档结果='" + oductdatatodjmodel.鼓风机一档结果.ToString() + "'");
            strSQL.Append(",鼓风机二档占空比='" + oductdatatodjmodel.鼓风机二档占空比.ToString() + "'");
            strSQL.Append(",鼓风机二档电压='" + oductdatatodjmodel.鼓风机二档电压.ToString() + "'");
            strSQL.Append(",鼓风机二档电流='" + oductdatatodjmodel.鼓风机二档电流.ToString() + "'");
            strSQL.Append(",鼓风机二档振动X='" + oductdatatodjmodel.鼓风机二档振动X.ToString() + "'");
            strSQL.Append(",鼓风机二档振动Y='" + oductdatatodjmodel.鼓风机二档振动Y.ToString() + "'");
            strSQL.Append(",鼓风机二档NVH结果='" + oductdatatodjmodel.鼓风机二档NVH结果.ToString() + "'");
            strSQL.Append(",鼓风机二档结果='" + oductdatatodjmodel.鼓风机二档结果.ToString() + "'");
            strSQL.Append(",鼓风机三档占空比='" + oductdatatodjmodel.鼓风机三档占空比.ToString() + "'");
            strSQL.Append(",鼓风机三档电压='" + oductdatatodjmodel.鼓风机三档电压.ToString() + "'");
            strSQL.Append(",鼓风机三档电流='" + oductdatatodjmodel.鼓风机三档电流.ToString() + "'");
            strSQL.Append(",鼓风机三档振动X='" + oductdatatodjmodel.鼓风机三档振动X.ToString() + "'");
            strSQL.Append(",鼓风机三档振动Y='" + oductdatatodjmodel.鼓风机三档振动Y.ToString() + "'");
            strSQL.Append(",鼓风机三档NVH结果='" + oductdatatodjmodel.鼓风机三档NVH结果.ToString() + "'");
            strSQL.Append(",鼓风机三档结果='" + oductdatatodjmodel.鼓风机三档结果.ToString() + "'");
            strSQL.Append(",鼓风机四档占空比='" + oductdatatodjmodel.鼓风机四档占空比.ToString() + "'");
            strSQL.Append(",鼓风机四档电压='" + oductdatatodjmodel.鼓风机四档电压.ToString() + "'");
            strSQL.Append(",鼓风机四档电流='" + oductdatatodjmodel.鼓风机四档电流.ToString() + "'");
            strSQL.Append(",鼓风机四档振动X='" + oductdatatodjmodel.鼓风机四档振动X.ToString() + "'");
            strSQL.Append(",鼓风机四档振动Y='" + oductdatatodjmodel.鼓风机四档振动Y.ToString() + "'");
            strSQL.Append(",NVH='" + oductdatatodjmodel.NVH.ToString() + "'");
            strSQL.Append(",鼓风机四档结果='" + oductdatatodjmodel.鼓风机四档结果.ToString() + "'");
            strSQL.Append(",蒸发器温度='" + oductdatatodjmodel.蒸发器温度.ToString() + "'");
            strSQL.Append(",温度压力传感器='" + oductdatatodjmodel.温度压力传感器.ToString() + "'");
            strSQL.Append(",CCU软件版本号='" + oductdatatodjmodel.CCU软件版本号.ToString() + "'");
            strSQL.Append(",CCU硬件版本号='" + oductdatatodjmodel.CCU硬件版本号.ToString() + "'");
            strSQL.Append(",EXV='" + oductdatatodjmodel.EXV.ToString() + "'");
            strSQL.Append(",SOTXV='" + oductdatatodjmodel.SOTXV.ToString() + "'");
            strSQL.Append(",CAN1结果='" + oductdatatodjmodel.CAN1结果.ToString() + "'");
            strSQL.Append(",CAN2结果='" + oductdatatodjmodel.CAN2结果.ToString() + "'");
            strSQL.Append(",LIN结果='" + oductdatatodjmodel.LIN结果.ToString() + "'");
            strSQL.Append(",CCU标定结果='" + oductdatatodjmodel.CCU标定结果.ToString() + "'");

            strSQL.Append(" WHERE testDoneDate='" + oductdatatodjmodel.testDoneDate.ToString() + "'");

            try
            {
                IDataParameter[] param = (IDataParameter[])paramlist.ToArray(typeof(IDataParameter));
                re = SqlHelperDJ2.ExceNonQuery(strSQL.ToString(), CommandType.Text, param);
            }
            catch
            {

            }
            return re;
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name=id></param>
        /// <returns></returns>
        public static bool delete(string testDoneDate)
        {
            bool re = false;
            try
            {
                re = SqlHelperDJ2.ExceNonQuery("delete from productDataToDJ where testDoneDate='" + testDoneDate + "'");
            }
            catch
            {

            }
            return re;
        }
        /// <summary>
        /// 删除所有的数据
        /// </summary>
        /// <returns></returns>
        public static bool delete()
        {
            bool re = false;
            try
            {
                re = SqlHelperDJ2.ExceNonQuery("delete from  productDataToDJ ");
            }
            catch
            {

            }
            return re;
        } /// <summary>
          /// 根据主键获取信息
          /// </summary>
          /// <param name=testDoneDate></param>
          /// <returns></returns>
        public static oductDataToDJModel2 GetDataModel(string testDoneDate)
        {
            oductDataToDJModel2 oductdatatodjmodel = new oductDataToDJModel2();
            DataTable dt = GetDataTable("  where testDoneDate='" + testDoneDate + "'");//SqlHelper.SqlHelper.QueryDataTable("select * from productDataToDJ where ID=" + ID.ToString());
            if (dt.Rows.Count > 0)
            {
                oductdatatodjmodel = GetData(dt.Rows[0]);
            }
            return oductdatatodjmodel;
        }

        /// <summary>
        /// DataRow生成oductDataToDJModel数据
        /// </summary>
        /// <param name=dr></param>
        /// <returns></returns>
        public static oductDataToDJModel2 GetData(DataRow dr)
        {
            oductDataToDJModel2 oductdatatodjmodel = new oductDataToDJModel2();
            oductdatatodjmodel.testDoneDate = dr["testDoneDate"].ToString();
            oductdatatodjmodel.typeName = dr["typeName"].ToString();
            oductdatatodjmodel.serialNumber = dr["serialNumber"].ToString();
            oductdatatodjmodel.操作员 = dr["操作员"].ToString();
            oductdatatodjmodel.总结果 = dr["总结果"].ToString();
            oductdatatodjmodel.新风内循环电压 = dr["新风内循环电压"].ToString();
            oductdatatodjmodel.新风内循环角度 = dr["新风内循环角度"].ToString();
            oductdatatodjmodel.新风内循环结果 = dr["新风内循环结果"].ToString();
            oductdatatodjmodel.新风外循环电压 = dr["新风外循环电压"].ToString();
            oductdatatodjmodel.新风外循环角度 = dr["新风外循环角度"].ToString();
            oductdatatodjmodel.新风外循环结果 = dr["新风外循环结果"].ToString();
            oductdatatodjmodel.新风出厂电压 = dr["新风出厂电压"].ToString();
            oductdatatodjmodel.新风出厂角度 = dr["新风出厂角度"].ToString();
            oductdatatodjmodel.新风出厂结果 = dr["新风出厂结果"].ToString();
            oductdatatodjmodel.循环内循环电压 = dr["循环内循环电压"].ToString();
            oductdatatodjmodel.循环内循环角度 = dr["循环内循环角度"].ToString();
            oductdatatodjmodel.循环内循环结果 = dr["循环内循环结果"].ToString();
            oductdatatodjmodel.循环外循环电压 = dr["循环外循环电压"].ToString();
            oductdatatodjmodel.循环外循环角度 = dr["循环外循环角度"].ToString();
            oductdatatodjmodel.循环外循环结果 = dr["循环外循环结果"].ToString();
            oductdatatodjmodel.循环出厂电压 = dr["循环出厂电压"].ToString();
            oductdatatodjmodel.循环出厂角度 = dr["循环出厂角度"].ToString();
            oductdatatodjmodel.循环出厂结果 = dr["循环出厂结果"].ToString();
            oductdatatodjmodel.鼓风机一档占空比 = dr["鼓风机一档占空比"].ToString();
            oductdatatodjmodel.鼓风机一档电压 = dr["鼓风机一档电压"].ToString();
            oductdatatodjmodel.鼓风机一档电流 = dr["鼓风机一档电流"].ToString();
            oductdatatodjmodel.鼓风机一档振动X = dr["鼓风机一档振动X"].ToString();
            oductdatatodjmodel.鼓风机一档振动Y = dr["鼓风机一档振动Y"].ToString();
            
            oductdatatodjmodel.鼓风机一档结果 = dr["鼓风机一档结果"].ToString();
            oductdatatodjmodel.鼓风机二档占空比 = dr["鼓风机二档占空比"].ToString();
            oductdatatodjmodel.鼓风机二档电压 = dr["鼓风机二档电压"].ToString();
            oductdatatodjmodel.鼓风机二档电流 = dr["鼓风机二档电流"].ToString();
            oductdatatodjmodel.鼓风机二档振动X = dr["鼓风机二档振动X"].ToString();
            oductdatatodjmodel.鼓风机二档振动Y = dr["鼓风机二档振动Y"].ToString();
            
            oductdatatodjmodel.鼓风机二档结果 = dr["鼓风机二档结果"].ToString();
            oductdatatodjmodel.鼓风机三档占空比 = dr["鼓风机三档占空比"].ToString();
            oductdatatodjmodel.鼓风机三档电压 = dr["鼓风机三档电压"].ToString();
            oductdatatodjmodel.鼓风机三档电流 = dr["鼓风机三档电流"].ToString();
            oductdatatodjmodel.鼓风机三档振动X = dr["鼓风机三档振动X"].ToString();
            oductdatatodjmodel.鼓风机三档振动Y = dr["鼓风机三档振动Y"].ToString();
            
            oductdatatodjmodel.鼓风机三档结果 = dr["鼓风机三档结果"].ToString();
            oductdatatodjmodel.鼓风机四档占空比 = dr["鼓风机四档占空比"].ToString();
            oductdatatodjmodel.鼓风机四档电压 = dr["鼓风机四档电压"].ToString();
            oductdatatodjmodel.鼓风机四档电流 = dr["鼓风机四档电流"].ToString();
            oductdatatodjmodel.鼓风机四档振动X = dr["鼓风机四档振动X"].ToString();
            oductdatatodjmodel.鼓风机四档振动Y = dr["鼓风机四档振动Y"].ToString();
            oductdatatodjmodel.NVH = dr["NVH"].ToString();
            oductdatatodjmodel.鼓风机四档结果 = dr["鼓风机四档结果"].ToString();
            oductdatatodjmodel.蒸发器温度 = dr["蒸发器温度"].ToString();
            oductdatatodjmodel.温度压力传感器 = dr["温度压力传感器"].ToString();
            oductdatatodjmodel.CCU软件版本号 = dr["CCU软件版本号"].ToString();
            oductdatatodjmodel.CCU硬件版本号 = dr["CCU硬件版本号"].ToString();
            oductdatatodjmodel.EXV = dr["EXV"].ToString();
            oductdatatodjmodel.SOTXV = dr["SOTXV"].ToString();
            oductdatatodjmodel.CAN1结果 = dr["CAN1结果"].ToString();
            oductdatatodjmodel.CAN2结果 = dr["CAN2结果"].ToString();
            oductdatatodjmodel.LIN结果 = dr["LIN结果"].ToString();
            oductdatatodjmodel.CCU标定结果 = dr["CCU标定结果"].ToString();
            try
            {
                oductdatatodjmodel.产品下线时间 = dr["产品下线时间"].ToString();
                oductdatatodjmodel.产品型号 = dr["产品型号"].ToString();
                oductdatatodjmodel.总成码 = dr["总成码"].ToString();
                oductdatatodjmodel.总结果 = dr["总结果"].ToString();
                oductdatatodjmodel.托盘号 = dr["托盘号"].ToString();
            }
            catch (System.Exception)
            {

                //throw;
            }

            return oductdatatodjmodel;
        }
        /// <summary>
        /// 获取信息,返回DataTtable
        /// </summary>
        /// <returns></returns>
        public static DataTable GetDataTable(string where)
        {
            return SqlHelperDJ2.QueryDataTable("select * from productDataToDJ" + where);
        }
        public static DataTable GetDataTable(string sql,bool alwaytrue)
        {
            return SqlHelperDJ2.QueryDataTable(sql);
        }
        /// <summary>
        /// 获取信息,返回List<oductDataToDJModel>
        /// </summary>
        /// <returns></returns>
        public static List<oductDataToDJModel2> GetData(string where)
        {
            List<oductDataToDJModel2> checkmonitormodel = new List<oductDataToDJModel2>();
            DataTable dt = GetDataTable(where);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                checkmonitormodel.Add(GetData(dt.Rows[i]));
            }
            return checkmonitormodel;
        }
        public static List<oductDataToDJModel2> GetData(string SQL,bool alwaytrue)
        {
            List<oductDataToDJModel2> checkmonitormodel = new List<oductDataToDJModel2>();
            DataTable dt = GetDataTable(SQL,true);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                checkmonitormodel.Add(GetData(dt.Rows[i]));
            }
            return checkmonitormodel;
        }
        /// <summary>
        /// 获取所有数据
        /// </summary>
        /// <returns></returns>
        public static List<oductDataToDJModel2> GetData()
        {
            return GetData("");
        }

    }
    public class oductDataToDJModel2
    {
        string _testDoneDate = "";
        /// <summary>
        /// 
        /// </summary>
        public string testDoneDate
        {
            get { return _testDoneDate; }
            set { _testDoneDate = value; }
        }
        string _typeName = "";
        /// <summary>
        /// 
        /// </summary>
        public string typeName
        {
            get { return _typeName; }
            set { _typeName = value; }
        }
        string _serialNumber = "";
        /// <summary>
        /// 
        /// </summary>
        public string serialNumber
        {
            get { return _serialNumber; }
            set { _serialNumber = value; }
        }
        string _操作员 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 操作员
        {
            get { return _操作员; }
            set { _操作员 = value; }
        }
        string _总结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 总结果
        {
            get { return _总结果; }
            set { _总结果 = value; }
        }
        string _新风内循环电压 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 新风内循环电压
        {
            get { return _新风内循环电压; }
            set { _新风内循环电压 = value; }
        }
        string _新风内循环角度 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 新风内循环角度
        {
            get { return _新风内循环角度; }
            set { _新风内循环角度 = value; }
        }
        string _新风内循环结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 新风内循环结果
        {
            get { return _新风内循环结果; }
            set { _新风内循环结果 = value; }
        }
        string _新风外循环电压 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 新风外循环电压
        {
            get { return _新风外循环电压; }
            set { _新风外循环电压 = value; }
        }
        string _新风外循环角度 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 新风外循环角度
        {
            get { return _新风外循环角度; }
            set { _新风外循环角度 = value; }
        }
        string _新风外循环结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 新风外循环结果
        {
            get { return _新风外循环结果; }
            set { _新风外循环结果 = value; }
        }
        string _新风出厂电压 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 新风出厂电压
        {
            get { return _新风出厂电压; }
            set { _新风出厂电压 = value; }
        }
        string _新风出厂角度 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 新风出厂角度
        {
            get { return _新风出厂角度; }
            set { _新风出厂角度 = value; }
        }
        string _新风出厂结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 新风出厂结果
        {
            get { return _新风出厂结果; }
            set { _新风出厂结果 = value; }
        }
        string _循环内循环电压 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 循环内循环电压
        {
            get { return _循环内循环电压; }
            set { _循环内循环电压 = value; }
        }
        string _循环内循环角度 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 循环内循环角度
        {
            get { return _循环内循环角度; }
            set { _循环内循环角度 = value; }
        }
        string _循环内循环结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 循环内循环结果
        {
            get { return _循环内循环结果; }
            set { _循环内循环结果 = value; }
        }
        string _循环外循环电压 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 循环外循环电压
        {
            get { return _循环外循环电压; }
            set { _循环外循环电压 = value; }
        }
        string _循环外循环角度 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 循环外循环角度
        {
            get { return _循环外循环角度; }
            set { _循环外循环角度 = value; }
        }
        string _循环外循环结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 循环外循环结果
        {
            get { return _循环外循环结果; }
            set { _循环外循环结果 = value; }
        }
        string _循环出厂电压 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 循环出厂电压
        {
            get { return _循环出厂电压; }
            set { _循环出厂电压 = value; }
        }
        string _循环出厂角度 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 循环出厂角度
        {
            get { return _循环出厂角度; }
            set { _循环出厂角度 = value; }
        }
        string _循环出厂结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 循环出厂结果
        {
            get { return _循环出厂结果; }
            set { _循环出厂结果 = value; }
        }
        string _鼓风机一档占空比 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机一档占空比
        {
            get { return _鼓风机一档占空比; }
            set { _鼓风机一档占空比 = value; }
        }
        string _鼓风机一档电压 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机一档电压
        {
            get { return _鼓风机一档电压; }
            set { _鼓风机一档电压 = value; }
        }
        string _鼓风机一档电流 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机一档电流
        {
            get { return _鼓风机一档电流; }
            set { _鼓风机一档电流 = value; }
        }
        string _鼓风机一档振动X = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机一档振动X
        {
            get { return _鼓风机一档振动X; }
            set { _鼓风机一档振动X = value; }
        }
        string _鼓风机一档振动Y = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机一档振动Y
        {
            get { return _鼓风机一档振动Y; }
            set { _鼓风机一档振动Y = value; }
        }
        string _鼓风机一档NVH结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机一档NVH结果
        {
            get { return _鼓风机一档NVH结果; }
            set { _鼓风机一档NVH结果 = value; }
        }
        string _鼓风机一档结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机一档结果
        {
            get { return _鼓风机一档结果; }
            set { _鼓风机一档结果 = value; }
        }
        string _鼓风机二档占空比 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机二档占空比
        {
            get { return _鼓风机二档占空比; }
            set { _鼓风机二档占空比 = value; }
        }
        string _鼓风机二档电压 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机二档电压
        {
            get { return _鼓风机二档电压; }
            set { _鼓风机二档电压 = value; }
        }
        string _鼓风机二档电流 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机二档电流
        {
            get { return _鼓风机二档电流; }
            set { _鼓风机二档电流 = value; }
        }
        string _鼓风机二档振动X = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机二档振动X
        {
            get { return _鼓风机二档振动X; }
            set { _鼓风机二档振动X = value; }
        }
        string _鼓风机二档振动Y = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机二档振动Y
        {
            get { return _鼓风机二档振动Y; }
            set { _鼓风机二档振动Y = value; }
        }
        string _鼓风机二档NVH结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机二档NVH结果
        {
            get { return _鼓风机二档NVH结果; }
            set { _鼓风机二档NVH结果 = value; }
        }
        string _鼓风机二档结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机二档结果
        {
            get { return _鼓风机二档结果; }
            set { _鼓风机二档结果 = value; }
        }
        string _鼓风机三档占空比 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机三档占空比
        {
            get { return _鼓风机三档占空比; }
            set { _鼓风机三档占空比 = value; }
        }
        string _鼓风机三档电压 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机三档电压
        {
            get { return _鼓风机三档电压; }
            set { _鼓风机三档电压 = value; }
        }
        string _鼓风机三档电流 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机三档电流
        {
            get { return _鼓风机三档电流; }
            set { _鼓风机三档电流 = value; }
        }
        string _鼓风机三档振动X = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机三档振动X
        {
            get { return _鼓风机三档振动X; }
            set { _鼓风机三档振动X = value; }
        }
        string _鼓风机三档振动Y = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机三档振动Y
        {
            get { return _鼓风机三档振动Y; }
            set { _鼓风机三档振动Y = value; }
        }
        string _鼓风机三档NVH结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机三档NVH结果
        {
            get { return _鼓风机三档NVH结果; }
            set { _鼓风机三档NVH结果 = value; }
        }
        string _鼓风机三档结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机三档结果
        {
            get { return _鼓风机三档结果; }
            set { _鼓风机三档结果 = value; }
        }
        string _鼓风机四档占空比 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机四档占空比
        {
            get { return _鼓风机四档占空比; }
            set { _鼓风机四档占空比 = value; }
        }
        string _鼓风机四档电压 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机四档电压
        {
            get { return _鼓风机四档电压; }
            set { _鼓风机四档电压 = value; }
        }
        string _鼓风机四档电流 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机四档电流
        {
            get { return _鼓风机四档电流; }
            set { _鼓风机四档电流 = value; }
        }
        string _鼓风机四档振动X = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机四档振动X
        {
            get { return _鼓风机四档振动X; }
            set { _鼓风机四档振动X = value; }
        }
        string _鼓风机四档振动Y = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机四档振动Y
        {
            get { return _鼓风机四档振动Y; }
            set { _鼓风机四档振动Y = value; }
        }
        string _NVH = "";
        /// <summary>
        /// 
        /// </summary>
        public string NVH
        {
            get { return _NVH; }
            set { _NVH = value; }
        }
        string _鼓风机四档结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 鼓风机四档结果
        {
            get { return _鼓风机四档结果; }
            set { _鼓风机四档结果 = value; }
        }
        string _蒸发器温度 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 蒸发器温度
        {
            get { return _蒸发器温度; }
            set { _蒸发器温度 = value; }
        }
        string _温度压力传感器 = "";
        /// <summary>
        /// 
        /// </summary>
        public string 温度压力传感器
        {
            get { return _温度压力传感器; }
            set { _温度压力传感器 = value; }
        }
        string _CCU软件版本号 = "";
        /// <summary>
        /// 
        /// </summary>
        public string CCU软件版本号
        {
            get { return _CCU软件版本号; }
            set { _CCU软件版本号 = value; }
        }
        string _CCU硬件版本号 = "";
        /// <summary>
        /// 
        /// </summary>
        public string CCU硬件版本号
        {
            get { return _CCU硬件版本号; }
            set { _CCU硬件版本号 = value; }
        }
        string _EXV = "";
        /// <summary>
        /// 
        /// </summary>
        public string EXV
        {
            get { return _EXV; }
            set { _EXV = value; }
        }
        string _SOTXV = "";
        /// <summary>
        /// 
        /// </summary>
        public string SOTXV
        {
            get { return _SOTXV; }
            set { _SOTXV = value; }
        }
        string _CAN1结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string CAN1结果
        {
            get { return _CAN1结果; }
            set { _CAN1结果 = value; }
        }
        string _CAN2结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string CAN2结果
        {
            get { return _CAN2结果; }
            set { _CAN2结果 = value; }
        }
        string _LIN结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string LIN结果
        {
            get { return _LIN结果; }
            set { _LIN结果 = value; }
        }
        string _CCU标定结果 = "";
        /// <summary>
        /// 
        /// </summary>
        public string CCU标定结果
        {
            get { return _CCU标定结果; }
            set { _CCU标定结果 = value; }
        }
        public string 产品下线时间 { get => _产品下线时间; set => _产品下线时间 = value; }
        public string 产品型号 { get => _产品型号; set => _产品型号 = value; }
        public string 总成码 { get => _总成码; set => _总成码 = value; }
        //public string 总结果 { get => _总结果; set => _总结果 = value; }
        public string 托盘号 { get => _托盘号; set => _托盘号 = value; }

        string _产品下线时间 = "";
        string _产品型号;
        string _总成码;
        string _托盘号;
    }
}